package com.div.tools.screen

import android.content.Context
import android.graphics.Point
import android.os.Bundle
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import com.div.tools.R
import kotlinx.android.synthetic.main.activity_screen.*

class ScreenActivity: AppCompatActivity() {
    val TAG = this.javaClass.simpleName

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        ScreenTool.test(this)
//        ScreenTool.hideNavBar(this)
//        ScreenTool.setStatusBarTransparent(this, false)
        ScreenTool.setNavBarTransparent(this, false)
        setContentView(R.layout.activity_screen)
        var windowManager: WindowManager = getSystemService(Context.WINDOW_SERVICE) as WindowManager
        val point = Point()
        windowManager.defaultDisplay.getRealSize(point)
        tv_real_x.text = "real x = " + point.x
        tv_real_y.text = "real y = " + point.y
        windowManager.defaultDisplay.getSize(point)
        tv_display_x.text = "display x = " + point.x
        tv_display_y.text = "display y = " + point.y
        tv_status_bar.text = "status bar height = " + ScreenTool.getStatusBarHeight()
        tv_nav_bar.text = "navigation bar height = " + ScreenTool.getNavigationBarHeight()
    }

}